/**
 * LevelManager
 * Manage levels
 **/
var LevelManager = function() {
	this.level = null;

	this.levels = [];

	this.init = function() {
		for (x in LevelConf) {
			this.levels.push(x);
		}
	}

	this.instantiate = function(name) {
		console.log(name);
		if (this.levels.indexOf(name) > -1) {
			this.level = new Level();
			this.level.init(name);
		}
	}

	this.destroy = function() {
		this.level.destroy();
		this.level = null;
	}

	this.update = function() {
		this.level.update();
	}

	this.render = function() {
		this.level.render();
	}

};